﻿using System.Web.Mvc;

namespace MSAcademic.v2.Web.Areas.Admin
{
    public class AdminAreaRegistration : AreaRegistration
    {
        public override string AreaName
        {
            get
            {
                return "Admin";
            }
        }

        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRoute("ArticlePreviewAdmin", "admin/novosti/preview", new { controller = "Article", action = "Preview" });
            context.MapRoute("ArticleCreateAdmin", "admin/novosti/kreiraj", new { controller = "Article", action = "Create" });
            context.MapRoute("ArticleUpdateAdmin", "admin/novosti/uredi/{id}", new { controller = "Article", action = "Update" });
            context.MapRoute("ArticleToggleHiddenAdmin", "admin/novosti/togglesakrij/{id}/{page}", new { controller = "Article", action = "ToggleHidden", page = 1 });
            context.MapRoute("ArticlePublishAdmin", "admin/novosti/objavi/{id}/{page}", new { controller = "Article", action = "Publish", page = 1 });
            context.MapRoute("ArticleIndexAdmin", "admin/novosti/{page}", new { controller = "Article", action = "Index", page = 1 });
            context.MapRoute("TagBindTest", "admin/bindTest", new { controller = "Article", action = "BindTest" });

            context.MapRoute("UploadArticleFrontPictures", "admin/novosti/{articleId}/slike/dodaj",new { controller = "Picture", action = "UploadFrontPictures" });
           
            context.MapRoute("DownloadAndUploadPicturesToGallery", "admin/galerija/{galleryId}/dodaj-sliku-url", new { controller = "Gallery", action = "DownloadAndUploadPicturesToGallery" });
            context.MapRoute("UploadPictureToGallery", "admin/galerija/{galleryId}/dodaj-slike", new { controller = "Gallery", action = "UploadPicturesToGallery" });
            context.MapRoute("ShowGallery", "admin/galerija/{galleryId}/pregledaj",new { controller = "Gallery", action = "ShowGallery" });
            context.MapRoute("ShowAllGalleries", "admin/galerije",new { controller = "Gallery", action = "ShowAllGalleries" });
            context.MapRoute("EditGalleryPicture", "admin/uredi/sliku/{pictureId}",new { controller = "Picture", action = "EditGalleryPicture" });
            context.MapRoute("EditGallery", "admin/galerija/{galleryId}/uredi",new { controller = "Gallery", action = "EditGallery" });
            context.MapRoute("ShowArticleFrontPictures", "admin/novosti/{articleId}/slike/prikazi",new { controller = "Picture", action = "ShowArticleFrontPictures" });

            context.MapRoute("EditArticleThumbnailPicture", "admin/novosti/{articleId}/slike/uredi/thumbnail",new { controller = "Picture", action = "EditArticleThumbnailPicture" });
            context.MapRoute("EditArticleNormalPicture", "admin/novosti/{articleId}/slike/uredi/normalna",new { controller = "Picture", action = "EditArticleNormalPicture" });
            context.MapRoute("EditArticleBigPicture", "admin/novosti/{articleId}/slike/uredi/velika",new { controller = "Picture", action = "EditArticleBigPicture" });
            
            context.MapRoute("TagIndexAdmin", "admin/tagovi", new { controller = "Tag", action = "TagList" });
            context.MapRoute("EditTagAdmin", "admin/uredi-tag/{TagId}", new { controller = "Tag", action = "EditTag" });
            context.MapRoute("DeleteTagAdmin", "admin/obrisi-tag/{tagId}", new { controller = "Tag", action = "DeleteTag" });

            context.MapRoute("ContentSections", "admin/sections", new { controller = "Section", action = "ContentSections" });
            context.MapRoute("SubSectionListForContentSection", "admin/list/{contentId}", new { controller = "Section", action = "SubSectionListForContentSection" });
            context.MapRoute("NewSubSection", "admin/sections/{contentId}/new", new { controller = "Section", action = "NewSubSection" });
            context.MapRoute("DeleteSubSection", "admin/sections/delete/{subId}", new { controller = "Section", action = "DeleteSubSection" });
            context.MapRoute("EditSubSection", "admin/sections/edit/{subId}", new { controller = "Section", action = "EditSubSection" });

            context.MapRoute("EditUserProfile", "admin/korisnik/uredi", new {controller = "User", action = "Update"});

            context.MapRoute("ChangeProfilePicture", "admin/korisnik/uredi/slika", new { controller = "Picture", action = "ChangeProfilePicture" });
            context.MapRoute("UploadUserProfilePicture", "admin/korisnik/uredi/slika/upload", new { controller = "Picture", action = "Upload" });
            context.MapRoute("DownloadAndSaveUserProfilePicture", "admin/korisnik/uredi/slika/download", new { controller = "Picture", action = "DownloadAndSave" });
            context.MapRoute("CropProfilePicture", "admin/korisnik/uredi/slika/crop", new { controller = "Picture", action = "CropProfilePicture" });
                           
            context.MapRoute("AdminHome", "admin", new { controller = "Home", action = "Index"});

            context.MapRoute("Registration", "admin/registracija/{*regtoken}", new { controller = "Login", action = "Registration" });
            context.MapRoute("AdminSignIn", "admin/prijava", new { controller = "Login", action = "SignIn" });
            context.MapRoute("AdminSignOut", "admin/odjava", new { controller = "Login", action = "SignOut" });
            context.MapRoute("AdminRequestPasswordReset", "admin/zatrazi-promjenu-lozinke", new { controller = "Login", action = "RequestPasswordReset" });
            context.MapRoute("AdminResetPassword", "admin/promjena-lozinke", new { controller = "Login", action = "ResetPassword" });

            context.MapRoute("DisplayUserInfo", "admin/display-user-info", new { controller = "Layout", Action = "DisplayUserInfo" });
        }
    }
}
